<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/view/include/inc.jsp"%>
<!DOCTYPE html >
<html>
<head>
<%@ include file="/WEB-INF/view/jQgrid.jsp"%>
</head>
<body style="background-color: white;" class="gray-bg">
	<div class="ibox-content">
		<form class="form-horizontal m-t" id="signupForm" method="post" enctype="multipart/form-data">
		   <input type="hidden" class="form-control" name="id"  value="${dataCollection.id}"/>
			<div class="form-group">
				<label class="col-sm-3 control-label">姓名：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="name" name="name"  value="${dataCollection.name}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">性别：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="sex" name="sex"  value="${dataCollection.sex}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">出生年月：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="birthday" name="birthday"  value="${dataCollection.birthday}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">年龄：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="age" name="age"  value="${dataCollection.age}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">户口：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="account" name="account"  value="${dataCollection.account}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">现居地：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="living" name="living"  value="${dataCollection.living}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">工作经验：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="workExp" name="workExp"  value="${dataCollection.workExp}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">学历：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="edu" name="edu"  value="${dataCollection.edu}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">手机号码：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="phone" name="phone"  value="${dataCollection.phone}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">邮箱：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="email" name="email"  value="${dataCollection.email}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">工作地点：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="workPlace" name="workPlace"  value="${dataCollection.workPlace}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">期望从事职位：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="job" name="job"  value="${dataCollection.job}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">期望行业：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="industry" name="industry"  value="${dataCollection.industry}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">期望薪资：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="salary" name="salary"  value="${dataCollection.salary}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">目前状态：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="status" name="status"  value="${dataCollection.status}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">自我评价：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="advantage" name="advantage"  value="${dataCollection.advantage}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">工作经历时间：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="workDate" name="workDate"  value="${dataCollection.workDate}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">工作经历公司：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="workCompany" name="workCompany"  value="${dataCollection.workCompany}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">工作经历职位：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="workJob" name="workJob"  value="${dataCollection.workJob}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">工作经历薪资：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="workSalary" name="workSalary"  value="${dataCollection.workSalary}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">工作经历描述：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="workDetail" name="workDetail"  value="${dataCollection.workDetail}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">项目名称：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="projectName" name="projectName"  value="${dataCollection.projectName}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">项目时间：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="projectDate" name="projectDate"  value="${dataCollection.projectDate}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">项目描述：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="projectDetail" name="projectDetail"  value="${dataCollection.projectDetail}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">教育时间：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="eduDate" name="eduDate"  value="${dataCollection.eduDate}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">教育学校：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="eduName" name="eduName"  value="${dataCollection.eduName}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">教育专业：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="eduPro" name="eduPro"  value="${dataCollection.eduPro}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">教育学历：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="education" name="education"  value="${dataCollection.education}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">培训名称：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="trainName" name="trainName"  value="${dataCollection.trainName}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">培训专业：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="trainPro" name="trainPro"  value="${dataCollection.trainPro}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">培训时间：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="trainDate" name="trainDate"  value="${dataCollection.trainDate}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">培训描述：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="trainDetail" name="trainDetail"  value="${dataCollection.trainDetail}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">专业技能：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="profess" name="profess"  value="${dataCollection.profess}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">获得证书：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="credentials" name="credentials"  value="${dataCollection.credentials}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">语言能力：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="language" name="language"  value="${dataCollection.language}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">采集网址：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="url" name="url"  value="${dataCollection.url}"/>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">1未采纳，2已采纳：</label>
				<div class="col-sm-8">
					<input type="text" class="form-control" id="isAdopt" name="isAdopt"  value="${dataCollection.isAdopt}"/>
				</div>
			</div>
			<div class="form-group" style="text-align: center;">
				<div class="col-sm-8 col-sm-offset-3">
					<button class="btn btn-primary" type="button" id="sub">提交</button>
				</div>
			</div>
		</form>
	</div>


	<script>
    $(function () {
	  $("#sub").click(function () {
        	//批量验证表单非空
			//调用方式
        	var arr=new Array(
        	  new Array('name','姓名未填写!'),
        	  new Array('sex','性别未填写!'),
        	  new Array('birthday','出生年月未填写!'),
        	  new Array('age','年龄未填写!'),
        	  new Array('account','户口未填写!'),
        	  new Array('living','现居地未填写!'),
        	  new Array('workExp','工作经验未填写!'),
        	  new Array('edu','学历未填写!'),
        	  new Array('phone','手机号码未填写!'),
        	  new Array('email','邮箱未填写!'),
        	  new Array('workPlace','工作地点未填写!'),
        	  new Array('job','期望从事职位未填写!'),
        	  new Array('industry','期望行业未填写!'),
        	  new Array('salary','期望薪资未填写!'),
        	  new Array('status','目前状态未填写!'),
        	  new Array('advantage','自我评价未填写!'),
        	  new Array('workDate','工作经历时间未填写!'),
        	  new Array('workCompany','工作经历公司未填写!'),
        	  new Array('workJob','工作经历职位未填写!'),
        	  new Array('workSalary','工作经历薪资未填写!'),
        	  new Array('workDetail','工作经历描述未填写!'),
        	  new Array('projectName','项目名称未填写!'),
        	  new Array('projectDate','项目时间未填写!'),
        	  new Array('projectDetail','项目描述未填写!'),
        	  new Array('eduDate','教育时间未填写!'),
        	  new Array('eduName','教育学校未填写!'),
        	  new Array('eduPro','教育专业未填写!'),
        	  new Array('education','教育学历未填写!'),
        	  new Array('trainName','培训名称未填写!'),
        	  new Array('trainPro','培训专业未填写!'),
        	  new Array('trainDate','培训时间未填写!'),
        	  new Array('trainDetail','培训描述未填写!'),
        	  new Array('profess','专业技能未填写!'),
        	  new Array('credentials','获得证书未填写!'),
        	  new Array('language','语言能力未填写!'),
        	  new Array('url','采集网址未填写!'),
        	  new Array('isAdopt','1未采纳，2已采纳未填写!'),
        	)
        	  for(var i=0;i<arr.length;i++){
	        	  if($("#"+arr[i][0]).val()==''){
	        		  $("#"+arr[i][0]).tips({
	  					side:3,
	  		            msg:arr[i][1],
	  		            bg:'#AE81FF',
	  		            time:1
	  		        });
	        		  $("#"+arr[i][0]).focus();
	  				return;
	  			}
        	  }
            $("#signupForm").ajaxSubmit({
                url: '<%=contextPath%>/dataCollection/update',
                type: 'post',
                dataType: "json",
                beforeSend: function () {
			        // 禁用按钮防止重复提交
					$("#sub").attr("disabled","disabled");
					swal("信息已经提交，请等待后台处理~！");
			    },
				success : function(data) {
					if (data.code == 200) {
						swal({
							title : data.message,
							type : "success",
							showCancelButton : false,
							confirmButtonText : "确定",
							animation : "slide-from-bottom",
							text: "2秒后自动关闭。", 
	      	    			timer: 2000, 
							closeOnConfirm : true
						}, function() {
							top.Dialog.close();
						});
					} else {
						swal("错误", data.message, "error");
					}  
				},    
				complete: function () {
			        $("#sub").removeAttr("disabled");
			    },
			    error: function (data) {
			    	swal("错误", data.message, "error");
			    }
        });
    });
  });  
</script>
</body>
</html>